"""
@Time : 2021/9/14 8:39 
@Author : 常雷
@File : t_8fromkeys.py 
@Software: PyCharm
"""
# 字典的fromkeys和python的内存
v = dict.fromkeys(['k1', 'k2'], [])     # {'k1': [], 'k2': []}  key值循环取值, value值都是后面的
print(v)
v['k1'].append(666)     # {'k1': [666], 'k2': [666]}
print(v)
v['k2'] = 888           # {'k1': [666], 'k2': 888}
print(v)